﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Flight_Reservation.Algrithm
{
    class Edge
    {
        public Node FirstNode { get; set; }
        public Node SecondNode { get; set; }
        public double Price { get; set; }
        public bool Visited { get; set; }

        //public Edge(Node firstNode, Node secondNode)
        //{
        //    FirstNode = firstNode;
        //    SecondNode = secondNode;
        //    Visited = false;
        //}

        public Edge(Node firstNode, Node secondNode, double price)
        {
            FirstNode = firstNode;
            SecondNode = secondNode;
            Price = price;
            Visited = false;
        }

        public Edge()
        {
            Visited = false;
            Price = -1;
        }

        public void Reset()
        {
            Visited = false;
            Price = -1;
            FirstNode = null;
            SecondNode = null;
        }

        public int CompareTo(Edge edge)
        {
            return Price.CompareTo(edge.Price);
        }
    }
}
